
// 参数ObjectKey下划线转驼峰
const paramsCamelCase = (params) => {
    if (typeof (params) === 'object') {
        return reformObject(params)
    } else {
        return params
    }
}

const reformObject = (obj) => {
    const _obj = obj instanceof Array ? [] : {}
    for (let key in obj) {
        const value = obj[key]
        if (value && typeof (value) === 'object') {
            _obj[_.camelCase(key)] = reformObject(value)
        } else {
            _obj[_.camelCase(key)] = value
        }
    }
    return _obj
}

export default paramsCamelCase
